package com.lotusyu.share;

import com.lotusyu.share.service.Serviceable;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class ServiceFactory {
    public Map<Integer,Serviceable> codeServiceMap = new ConcurrentHashMap<>();
    public Serviceable getService(int code){
        return  codeServiceMap.get(code);
    }

    public void put(int code,Serviceable service){
        this.codeServiceMap.put(code,service);
    }
}
